import { DEFAULT_LAYOUT } from '../base'
import { AppRouteRecordRaw } from '../types'

const FINANCIALSYS: AppRouteRecordRaw = {
  path: '/financialSys',
  name: 'financialSys',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '财务系统',
    icon: 'iconfont icon-caiwu',
    requiresAuth: true,
    order: 2
  },
  children: [
    {
      path: 'accountFlowDetails',
      name: 'accountFlowDetails',
      component: '',
      meta: {
        locale: '账户流水明细',
        requiresAuth: true,
        roles: ['*']
      },
      children: [
        {
          path: 'publicAccount',
          name: 'publicAccount',
          component: () => import('@renderer/views/accountFlowDetails/publicAccount/index.vue'),
          meta: {
            locale: '公账',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'privateAccount',
          name: 'privateAccount',
          component: () => import('@renderer/views/accountFlowDetails/privateAccount/index.vue'),
          meta: {
            locale: '私账',
            requiresAuth: true,
            roles: ['*']
          }
        }
      ]
    },
    {
      path: 'statement',
      name: 'statement',
      component: '',
      meta: {
        locale: '对账单',
        requiresAuth: true,
        roles: ['*']
      },
      children: [
        {
          path: 'accountsReceivable',
          name: 'accountsReceivable',
          component: () => import('@renderer/views/statement/accountsReceivable/index.vue'),
          meta: {
            locale: '应收账款',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'accountsPayable',
          name: 'accountsPayable',
          component: () => import('@renderer/views/statement/accountsPayable/index.vue'),
          meta: {
            locale: '应付账款',
            requiresAuth: true,
            roles: ['*']
          }
        }
      ]
    },
    {
      path: 'invoiceManage',
      name: 'invoiceManage',
      component: '',
      meta: {
        locale: '发票管理',
        requiresAuth: true,
        roles: ['*']
      },
      children: [
        {
          path: 'inputInvoice',
          name: 'inputInvoice',
          component: () => import('@renderer/views/invoiceManage/inputInvoice/index.vue'),
          meta: {
            locale: '进项发票',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'outInvoice',
          name: 'outInvoice',
          component: () => import('@renderer/views/invoiceManage/outInvoice/index.vue'),
          meta: {
            locale: '开出发票',
            requiresAuth: true,
            roles: ['*']
          }
        }
      ]
    },

    {
      path: 'assetInventory',
      name: 'assetInventory',
      component: '',
      meta: {
        locale: '固定资产',
        requiresAuth: true,
        roles: ['*']
      },
      children: [
        {
          path: 'equipmentFixedAssets',
          name: 'equipmentFixedAssets',
          component: () => import('@renderer/views/assetInventory/equipmentFixedAssets/index.vue'),
          meta: {
            locale: '设备固定资产',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'otherFixedAssets',
          name: 'otherFixedAssets',
          component: () => import('@renderer/views/assetInventory/otherFixedAssets/index.vue'),
          meta: {
            locale: '其他固定资产',
            requiresAuth: true,
            roles: ['*']
          }
        }
      ]
    },
    {
      path: 'financialStatement',
      name: 'financialStatement',
      meta: {
        locale: '财务统计报表',
        requiresAuth: true,
        roles: ['*']
      },
      component: '',
      children: [
        {
          path: 'businessSituation',
          name: 'businessSituation',
          component: () => import('@renderer/views/financialStatement/businessSituation.vue'),
          meta: {
            locale: '经营情况',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'salesStatus',
          name: 'salesStatus',
          component: () => import('@renderer/views/financialStatement/salesStatus.vue'),
          meta: {
            locale: '销售情况',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'materialPurchase',
          name: 'materialPurchase',
          component: () => import('@renderer/views/financialStatement/materialPurchase.vue'),
          meta: {
            locale: '材料采购',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'incomeExpenditure',
          name: 'incomeExpenditure',
          component: () => import('@renderer/views/financialStatement/incomeExpenditure.vue'),
          meta: {
            locale: '收支情况',
            requiresAuth: true,
            roles: ['*']
          }
        }
      ]
    },
    {
      path: 'financialSheet',
      name: 'financialSheet',
      meta: {
        locale: '财务报表',
        requiresAuth: true,
        roles: ['*']
      },
      component: '',
      children: [
        {
          path: 'financeTotalAssetStat',
          name: 'financeTotalAssetStat',
          component: () => import('@renderer/views/financialSheet/financeTotalAssetStat.vue'),
          meta: {
            locale: '总资产盘底统计表',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'monthIncomeExpendStat',
          name: 'monthIncomeExpendStat',
          component: () => import('@renderer/views/financialSheet/monthIncomeExpendStat.vue'),
          meta: {
            locale: '收支情况统计表',
            requiresAuth: true,
            roles: ['*']
          }
        },
        // {
        //   path: 'businessSituation',
        //   name: 'businessSituation',
        //   component: () => import('@renderer/views/financialSheet/businessSituation.vue'),
        //   meta: {
        //     locale: '销售情况统计表',
        //     requiresAuth: true,
        //     roles: ['*']
        //   }
        // },
        {
          path: 'financePurchaseTypeStat',
          name: 'financePurchaseTypeStat',
          component: () => import('@renderer/views/financialSheet/financePurchaseTypeStat.vue'),
          meta: {
            locale: '采购情况统计表',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'incomeExpendDetailStat',
          name: 'incomeExpendDetailStat',
          component: () => import('@renderer/views/financialSheet/incomeExpendDetailStat.vue'),
          meta: {
            locale: '财务收支明细表',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'prodDetailStat',
          name: 'prodDetailStat',
          component: () => import('@renderer/views/financialSheet/prodDetailStat.vue'),
          meta: {
            locale: '生产完成情况明细表',
            requiresAuth: true,
            roles: ['*']
          }
        }
      ]
    },
    {
      path: 'salarySheet',
      name: 'salarySheet',
      meta: {
        locale: '工资表',
        requiresAuth: true,
        roles: ['*'],
        hideChildrenInMenu: true
      },
      component: () => import('@renderer/views/salarySheet/index.vue')
    }
  ]
}

export default FINANCIALSYS
